<?php
/* @var $this SiteController */
/* @var $model LoginForm */
/* @var $form CActiveForm  */

$this->pageTitle=Yii::app()->name . ' - Login';

?>

<?php $this->beginWidget('bootstrap.widgets.TbModal', array(
'id'=>'myModal',
'autoOpen'=>true,
)); ?>
 
<div class="modal-header">
    <a class="close" data-dismiss="modal">&times;</a>
    <h1>Autenticación</h1>
</div>
 
<div class="modal-body">
    <div class="form">

<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'login-form',
    'type'=>'horizontal',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	), 
)); ?>

	

	<?php echo $form->textFieldRow($model,'username'); ?>

	<?php echo $form->passwordFieldRow($model,'password'); ?>

	<?php echo $form->checkBoxRow($model,'rememberMe'); ?>

</div><!-- form -->

</div>
 
<div class="modal-footer">
   
   <?php $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType'=>'submit',
            'type'=>'primary',
            'label'=>'Iniciar sesión',
        )); ?>

    <?php $this->widget('bootstrap.widgets.TbButton', array(
        'label'=>'Cerrar',
        'url'=>'#',
        'htmlOptions'=>array('data-dismiss'=>'modal'),
    )); ?>
</div>
 <?php $this->endWidget(); ?>
<?php $this->endWidget(); ?>


<div class="bottominicio">
    <p><?php $this->widget('bootstrap.widgets.TbButton', array(
        'type'=>'primary',
        'size'=>'large',
        'label'=>'Iniciar Sesión',
        'url'=>array('/site/login'),
        )); ?></p>
        
        <?php /*echo CHtml::link("Iniciar Sesión",array("/site/login",array('visible'=>!Yii::app()->user->isGuest),),
        array("class"=>"btn btn-primary")); */?>
</div>

<img id="img" src="../images/sio.png">